package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// SysUserssEntityToDto entity data transfer
func SysUserssEntityToDto(sysUserss []*entity.SysUsers) []*model.SysUsersInfo {
	out := make([]*model.SysUsersInfo, 0, len(sysUserss))
	for _, c := range sysUserss {
		out = append(out, SysUsersEntityToDto(c))
	}
	return out
}

// SysUsersEntityToDto entity data transfer
func SysUsersEntityToDto(e *entity.SysUsers) *model.SysUsersInfo {
	return &model.SysUsersInfo{

		Id: e.Id,

		Uuid: e.Uuid,

		Username: e.Username,

		Password: e.Password,

		NickName: e.NickName,

		SideMode: e.SideMode,

		HeaderImg: e.HeaderImg,

		BaseColor: e.BaseColor,

		ActiveColor: e.ActiveColor,

		AuthorityId: e.AuthorityId,

		Phone: e.Phone,

		Email: e.Email,

		Enable: e.Enable,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,

		DeletedAt: e.DeletedAt,
	}
}
